feat: port pspath workspace support#3
Open
dkattan wants to merge 4 commits into
Open
Conversation
Port the provider-backed workspace and pspath URI support from feature/get-content onto the private host-package branch so the Immense wrapper package can be published for ImmyBot consumption. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the provider-backed workspace port compatible with the older feature/submodule-to-nuget branch by using ScriptFile.IsInMemory and restoring the workspace path helpers AnalysisService still expects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When Get-ChildItem enumerates items from the ScriptPSProvider drive, PowerShell sets PSPath to the drive-qualified form (pspath:\local\Function\script.ps1) rather than the provider-qualified form (ScriptPSProvider::local\Function\script.ps1). CreatePowerShellPathUri now detects drive-qualified pspath: paths and converts them to pspath://ScriptPSProvider/local/Function/script.ps1 URIs so they round-trip correctly through GetPowerShellPath and TryGetFile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three fixes for EnumeratePSFiles to work with non-FileSystem providers: 1. CreatePowerShellPathUri: handle provider-qualified pspath: drive paths (ScriptPSProvider::pspath:\local\Function\script.ps1) by stripping the provider prefix and reconstructing the URI from the drive-qualified path. 2. Skip Include/Exclude/Depth/FollowSymlink parameters for non-FileSystem provider paths. These are FileSystem-specific dynamic parameters that cause Get-ChildItem to fail with ProviderInvocationException on custom providers like ScriptPSProvider. 3. Add s_psPathProviderHost constant for the ScriptPSProvider host component used in pspath:// URIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pspath://workspace and document handling fromdkattan/feature/get-contentfeature/submodule-to-nugetpackaging branchMicrosoft.PowerShell.EditorServices.Host 3.18.1-preview.3from this branchValidation